﻿
namespace Unity.Game.ElisAdvance.MonsterAIScript
{
    public class TestGoblinMonster
    {
        private EnemyAI ai;

        public TestGoblinMonster(EnemyAI ai)
        {
            this.ai = ai;
        }

        public float thinkTerm()
        {
            return 0.25f;
        }

        public float moveEvent()
        {
            if (ai.isTargetInArea(-7.50f, -1.0f, 15.0f, 2.0f))
                return 0;

            return -1;
        }

        public float action()
        {
            if (ai.isRest())
            {
                if (ai.isTargetInArea(0.5f, -1.0f, 1.5f, 2.0f))
                {
                    if (Math2.random(0, 100.0f, 50.0f))
                    {
                        return 0.0f;
                    }
                    else
                    {
                        return 1.0f;
                    }
                }
            }

            return -1.0f;
        }


    }

}